#include "stdafx.h"
#include "GameplayState.h"
#include "../Game.h"
#include "BaseState.h"
#include "../SoundManager/SoundManager.h"
#include "../InputManager/InputManager.h"

GameplayState::GameplayState()
{
	game = nullptr;
	stateManager = nullptr;
	soundManager = nullptr;
	inputManager = nullptr;
}

GameplayState::~GameplayState()
{

}

void GameplayState::Initialize(Game * game)
{
	this->game = game;
	stateManager = game->GetStateManager();
	soundManager = game->GetSoundManager();
	inputManager = game->GetInputManager();
}

void GameplayState::Enter(void)
{
	soundManager->PlayMusicSound(TEST_MUSIC);
}

void GameplayState::Exit(void)
{

}

bool GameplayState::Input(void)
{
	if (inputManager->InputPressed(W_KEY))
		soundManager->Play3DSound(TEST_3D_SFX);
	return true;
}

void GameplayState::Update(float fElapsedTime)
{

}